<template>
    <div>
        <h2>添加游戏页面</h2>
        <p>游戏名称：<input type="text" v-model="game"></p>
        <p><input type="button" value="添加游戏" @click="addgame()"></p>    
    </div>    
</template>

<script>
import {addgame} from "../axios_api/api.js"
export default {
    name:"addgame",
    data() {
        return {
            game:""
        }
    },
    methods:{
        addgame(){
            var data = {
                "game":this.game
            }
            addgame(data).then(res=>{
                console.log(res)
            })
        }
    }
}
</script>

<style>

</style>
